const express=require('express')
const router=express.Router()

//用户路由处理函数对应的中间件
const handler=require('../router_handler/med_sup')
//导入验证数据中间件
const expressJoi=require('@escook/express-joi')
const {pursup_find_schema,sup_schema,sup_update_schema,delete_schema}=require('../schema/medicine')

router.post('/findall',handler.supall)
router.post('/insert',expressJoi(sup_schema),handler.supinsert)
router.post('/delete',expressJoi(delete_schema),handler.supdelete)
router.post('/update',expressJoi(sup_update_schema),handler.supupdate)
router.post('/find',expressJoi(pursup_find_schema),handler.supfind)
module.exports=router